<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<title>录入人员信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="css/style.css" rel="stylesheet" type="text/css">
<link type="text/css" href="jquery/jquery-ui-1.8.19.custom.css" rel="stylesheet" />
<script type="text/javascript" src="jquery/jquery.min.js"></script>
<script type="text/javascript" src="jquery/jquery-ui-1.8.19.custom.min.js"></script>
<script type="text/javascript" src="script/commons.js"></script>
<script type="text/javascript" src="script/objects.js"></script>
<script type="text/javascript">
function modify() {
	var tr = findParent(event.srcElement, "TR");
	var uid = $(tr).children("td")[0].innerText;
	to("forwardUseradd.do?mode=modify&uid=" + uid);
}
function disable() {
	alert("disable");
}
</script>
<style type="text/css">
#uid { width: 5%; }
#uname { width: 30%; }
#roleName { width: 25%; }
#department { width: 20%; }
#buttons { width: 20%; }
</style>
</head>
<body>
	<form action="userallinfo.do" method="post">
		<div class="button_bar">
			<button class="common_button" onclick="to('forwardUseradd.do');">
				新增 <img alt="新增" src="images/mainButton/addbutton.gif" width="10px;">
			</button>
		</div>
		<table width="770" height="133" class="data_list_table">
			<tr>
				<th id="uid">编号</th>
				<th id="uname">账户名</th>
				<th id="roleName">角色</th>
				<th id="department">所属部门</th>
				<th id="buttons">执行操作</th>
			</tr>
            <c:if test="${list!=null}" var="sel">
			<c:forEach var="list" items="${list}" varStatus="i">
            <c:choose>
            	<c:when test="${i.index % 2 == 0}">
                <tr class="row1">
                </c:when>
                <c:otherwise>
                <tr class="row2">
                </c:otherwise>
            </c:choose>
                <td class="list_data_number">${list.uid}</td>
                <td class="list_data_text">${list.uname}</td>
                <td class="list_data_text">${list.role.roleName}</td>
                <td class="list_data_text">${list.department}</td>
                <td class="list_data_text">
                    <a href="javascript:void()" onclick="modify()">
                    <img title="修改"
                    src="images/bt_edit.gif" class="op_button" alt="修改"
                    style="width: 20px; height: 20px;" />
                    修改</a>
                </td>
            </tr>
					<!--隐藏域 显示详细信息  -->
				</c:forEach>
			</c:if>
			<tr>
			</tr>

			<tr>
				<th colspan="7" class="pager">
					<div class="">
						共${page.totalRows}条记录 每页 ${page.pageSize} 条 第 ${page.currentPage}
						页/共${page.totalPages}页
						<html:link action="/userallinfo.do?pageMethod=first"
							paramName="page" paramProperty="currentPage"
							paramId="currentPage">
							<img alt="首页" src="images/mainButton/pagefirst.gif" width="10px;"
								border="0px;">
						</html:link>
						<html:link action="/userallinfo.do?pageMethod=previous"
							paramName="page" paramProperty="currentPage"
							paramId="currentPage">
							<img alt="首页" src="images/mainButton/pageprev.gif" width="60px;"
								border="0px;">
						</html:link>
						<html:link action="/userallinfo.do?pageMethod=next"
							paramName="page" paramProperty="currentPage"
							paramId="currentPage">
							<img alt="首页" src="images/mainButton/pagenext.gif" width="60px;"
								border="0px;">
						</html:link>
						<html:link action="/userallinfo.do?pageMethod=last"
							paramName="page" paramProperty="currentPage"
							paramId="currentPage">
							<img alt="首页" src="images/mainButton/pageafter.gif" width="10px;"
								border="0px;">
						</html:link>
						转到 <input value="1" size="2" /> 页
						<button width="20" onclick="reload();">GO</button>

					</div>
				</th>
			</tr>
		</table>
	</form>
</body>

</html>